<?php   // $Id: users_delete.php 234 2008-07-06 21:49:31Z pcoustillas $ ?>
<?php   
/*Copyright (C) 2003-2004 Guy Hendrickx
Licensed under the terms of the GNU  General Public License:http://www.opensource.org/licenses/gpl-license.php
File Authors:Guy Hendrickx
Modification : Pierre Coustillas*/

require_once("include/verif.php");
require_once("include/config/common.php");
require_once("include/language/$lang.php");
require_once("include/utils.php");
$num_user=isset($_GET['num_user'])?$_GET['num_user']:"";
$sql = " SELECT admin FROM ${tblpref}user WHERE num = $num_user ";
$req = mysql_query($sql) or die("Erreur SQL !<br/>$sql<br/>" . mysql_error());
$admin = mysql_result($req,0);

$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());

if ($admin == 'y') { 
	header("Location: users_lister.php?message=$lang_impo_del_util");
	exit;
}
$sql ="DELETE FROM ${tblpref}user WHERE num = $num_user";
mysql_query($sql) OR die("Erreur suppression <br/>$sql<br/>" . mysql_error());

header("Location: users_lister.php");
?>
